<extend name="Public:common" />
<!--/sidebar-->
<block name="content">
    <div class="main-wrap">
        <div class="crumb-wrap">
            <div class="crumb-list"> <i class="icon-font"></i>
                <a href="/Admin">首页</a>
                <span class="crumb-step">&gt;</span>
                <span class="crumb-name">公示管理</span>
            </div>
        </div>
        <div class="search-wrap">
            <div class="search-content">
                <form action="" method="get">
                    <table class="search-tab">
                        <tr>
<!--                             <th width="120">选择分类:</th>
                            <td>
                                <select name="search" id="">
                                    <option value="">全部</option>
                                    <option value="0"  
                                    <if condition="$search eq 0"> selected
                                    </if>>计划</option>
                                    <option value="1" <if condition="$search eq 1"> selected
                                    </if>>活动</option>
                                </select>
                            </td> -->
                            <th width="70">关键字:</th>
                            <td>
                                <input class="common-text" placeholder="关键字" name="keywords" value="" id="" type="text"></td>
                            <td>
                                <input class="btn btn-primary btn2" name="sub" value="查询" type="submit"></td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
        <div class="result-wrap">
                <div class="result-content">
                    <table class="result-tab" width="100%">
                        <tr>
                            <th>ID</th>
                            <th>申请名称</th>
                            <!-- <th>发起人</th> -->
                            <!-- <th>发起人身份证</th> -->
                            <th>保护人</th>
                            <th>保护人身份证</th>
                            <th>描述</th>
                            <th>当前状态</th>
                            <th>类型</th>
                            <th>公示状态</th>
                            <th>创建时间</th>
                            <th>操作</th>

                        </tr>
                        <foreach name="Garr" item="vo">
                        <tr>
                        <td>{$vo.sid}</td>
                        <td>{$vo.sname}</td>
                        <!-- <td>{$vo.fuser}</td> -->
                        <!-- <td>{$vo.fcardid}</td> -->
                        <td>{$vo.buser}</td>
                        <td>{$vo.bcardid}</td>
                        <td>{$vo.miaoshu}</td>
                        <if condition="($vo.status eq 0)"> <td>未通过</td>
                        <else /> <td>通过</td>
                        </if>

                        <if condition="($vo.stype eq 0)"> <td>计划</td>
                        <else /> <td>活动</td>
                        </if>
 

                        <if condition="$vo.stus eq 0"> <td>等待筹款</td>
                        <elseif condition="$vo.stus eq 1"/><td>发起筹款</td>
                        <else /> <td>提前结束</td>
                        </if>

                        <td>{$vo.createtime}111</td>
                        <td>
                        <a class="link-update" href="{:U('Admin/Gongshi/shen/id/'.$vo['sid'])}">审核</a>
                            <if condition="$vo.stus eq 0"> 
                               <a href="javascript:update({$vo['sid']},1)">发起筹款</a>
                                <elseif condition="$vo.stus eq 1"/>
                                <a href="javascript:update({$vo['sid']},2)">提前结束</a>
                                <else /> 
                                <a href="javascript:update({$vo['sid']},1)">重新筹款</a>
                            </if>
                            <a class="link-del" href="javascript:del({$vo['sid']})">删除</a>
                        </td>
                    </tr>
                    </foreach>
                </table>
                <div class="list-page">{$page}</div>
            </div>
    </div>
</div>

<!--/main-->
<script type="text/javascript">
function del(id) {
    if(confirm("执行后将无法恢复，确定继续吗？温馨提示"))
            {
        $.post('__URL__/delete', {'sid':id}, function(data){
           alert(data);
           location.reload([true])  
        });
        exit;
        }
    }
    function update(id,sta) {
    if(confirm("执行后将无法恢复，确定继续吗？温馨提示"))
            {
        $.post('__URL__/up', {'sid':id,sta:sta}, function(data){
           alert(data);
           location.reload([true])  
        });
        exit;
        }
    }
</script>
</block>